-- GENERATED SPELL FOR [Skeletal Warder] --


function spell0_785(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_785', 11500, 1)
end

function spell1_785(pUnit, Event) --@Quick Frost Ward,n/a--
pUnit:FullCastSpellOnTarget(4980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_785', 11500, 1)
end

function spell2_785(pUnit, Event) --@Unholy Frenzy,n/a--
pUnit:FullCastSpellOnTarget(8699,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_785', 20000, 1)
end

function Sorts_785(pUnit, Event)
local choix_sorts_785 = math.random(0, 2)
if choix_sorts_785 == 0 then
pUnit:RegisterEvent('spell0_785', 1, 1)
end
if choix_sorts_785 == 1 then
pUnit:RegisterEvent('spell1_785', 1, 1)
end
if choix_sorts_785 == 2 then
pUnit:RegisterEvent('spell2_785', 1, 1)
end
end

function mob785_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_785', math.random(1500, 3000), 1)
end

function mob785_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob785_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob785_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(785, 1, 'mob785_Action')
RegisterUnitEvent(785, 2, 'mob785_Leave')
RegisterUnitEvent(785, 3, 'mob785_Kill')
RegisterUnitEvent(785, 4, 'mob785_Die')
